Global Const TRUE = -1, FALSE = 0 '-------------------------------------------------------------------------- ' These are the user-defined TYPE declarations for VBTOOLS.VBX Type WinFlags WF_80x87 As Integer ' True or false WF_CPU As Integer ' 86,186,286,386,486 WF_MODE As Integer ' 1=Standard,2=386 enhanced WF_FRAME As Integer ' 1=EMS large-frame, 2=EMS small-frame End Type '-------------------------------------------------------------------------- ' These are the SUB and FUNCTION declarations for VBTOOLS.VBX Declare Function Bload% Lib "vbtools.vbx" (ByVal Lin$, X As Any, ByVal Length&) Declare Function Bsave% Lib "vbtools.vbx" (ByVal Lin$, X As Any, ByVal Length&) Declare Function CVDMBF# Lib "vbtools.vbx" (Doub$) Declare Function CVSMBF! Lib "vbtools.vbx" (Float$) Declare Function CVI% Lib "vbtools.vbx" (ByVal Lin$) Declare Function CVL& Lib "vbtools.vbx" (ByVal Lin$) Declare Function CVS! Lib "vbtools.vbx" (ByVal Lin$) Declare Function CVC@ Lib "vbtools.vbx" (ByVal Lin$) Declare Function CVD# Lib "vbtools.vbx" (ByVal Lin$) Declare Function MhBlue% Lib "vbtools.vbx" (ByVal xColor&) Declare Function MhDefaultDrive% Lib "vbtools.vbx" () Declare Function MhDirectoryExists% Lib "vbtools.vbx" (A$) Declare Function MhEcode% Lib "vbtools.vbx" () Declare Function MhExeName$ Lib "vbtools.vbx" (ByVal Hwnd As Integer) Declare Function MhExePath$ Lib "vbtools.vbx" (ByVal Hwnd As Integer) Declare Function MhFileExists% Lib "vbtools.vbx" (A$) Declare Function MhFileDateCompare% Lib "vbtools.vbx" (ByVal F1$, ByVal F2$) Declare Function MhGreen% Lib "vbtools.vbx" (ByVal xColor&) Declare Function MhKillFiles% Lib "vbtools.vbx" (ByVal Attr%, A$) Declare Function MhRed% Lib "vbtools.vbx" (ByVal xColor&) Declare Sub MhRgb Lib "vbtools.vbx" (ByVal xColor&, Red%, Green%, Blue%) Declare Sub MhScrMono Lib "vbtools.vbx" (ByVal Lin$, ByVal Row%, ByVal Col%, ByVal Attr%) Declare Function MhSetDefaultDrive% Lib "vbtools.vbx" (ByVal A%) Declare Function MhSystemDir$ Lib "vbtools.vbx" () Declare Function MhWinDir$ Lib "vbtools.vbx" () Declare Sub MhWinFlags Lib "vbtools.vbx" (WindowsFlags As WinFlags) Declare Function MhWinVersion% Lib "vbtools.vbx" (Major%, Minor%) Declare Function MKI$ Lib "vbtools.vbx" (ByVal A%) Declare Function MKL$ Lib "vbtools.vbx" (ByVal A&) Declare Function MKD$ Lib "vbtools.vbx" (A#) Declare Function MKDMBF$ Lib "vbtools.vbx" (Doubl#) Declare Function MKS$ Lib "vbtools.vbx" (A!) Declare Function MKSMBF$ Lib "vbtools.vbx" (Float!) Declare Function MKC$ Lib "vbtools.vbx" (A@) Declare Function Play% Lib "vbtools.vbx" (ByVal Lin$) Declare Sub PlayStop Lib "vbtools.vbx" () '-------------------------------------------------------------------------- ' These are the SUB and FUNCTION declarations for Windows KEYBOARD.DRV DLL Declare Function GetKeyboardType% Lib "Keyboard.Drv" (ByVal nTypeFlag%) '-------------------------------------------------------------------------- ' These are the user-defined TYPE declarations for Windows GDI DLL Type TextMetric ' Used with GetTextMetrics TmHeight As Integer TmAscent As Integer TmDescent As Integer TmInternalLeading As Integer TmExternalLeading As Integer TmAveCharWidth As Integer TmMaxCharWidth As Integer TmWeight As Integer TmItalic As String * 1 TmUnderlined As String * 1 TmStruckOut As String * 1 TmFirstChar As String * 1 TmLastChar As String * 1 TmDefaultChar As String * 1 TmBreakChar As String * 1 TmPitchAndFamily As String * 1 TmCharSet As String * 1 tOverhang As Integer TmDigitizedAspectX As Integer TmDigitizedAspectY As Integer End Type '-------------------------------------------------------------------------- ' These are the SUB and FUNCTION declarations for Windows GDI DLL Declare Function GetTextExtent& Lib "Gdi" (ByVal hDC%, ByVal lpString$, ByVal nCount%) Declare Function BitBlt% Lib "Gdi" (ByVal destDC%, ByVal X%, ByVal Y%, ByVal W%, ByVal H%, ByVal srcDC%, ByVal xSrc%, ByVal ySrc%, ByVal RasterOp&) ' BitBlt moves a bitmap from the ' source device to the destination ' device. See the CONST section for ' values for RasterOp&. Declare Function GetTextMetrics% Lib "Gdi" (ByVal hDC%, A As TextMetric) Declare Function GetTextCharacterExtra% Lib "Gdi" (ByVal hDC%) Declare Function SetStretchBltMode% Lib "Gdi" (ByVal DestHdc%, ByVal StretchMode%) ' This function sets the stretching ' mode for the StretchBlt function. ' The stretching mode determines ' which scan lines and/or columns ' StretchBlt eliminates when ' contracting a bitmap. ' StretchMode% is one of: Global Const BLACKONWHITE = 1 ' AND in the eliminated lines. ' Preserves black pixels at ' the expense of white pixels ' by using the AND operator ' on the eliminated lines and ' those remaining. Global Const WHITEONBLACK = 2 ' OR in the eliminated lines. ' Preserves white pixels at ' the expense of black pixels ' by using the OR operator ' on the eliminated lines and ' those remaining. Global Const COLORONCOLOR = 3 ' Deletes the eliminated lines ' without preserving their ' information. Declare Function SetTextCharacterExtra% Lib "Gdi" (ByVal hDC%, ByVal nCharExtra%) Declare Function StretchBlt% Lib "Gdi" (ByVal destDC%, ByVal DestX%, ByVal DestY%, ByVal W%, ByVal H%, ByVal srcDC%, ByVal xSrc%, ByVal ySrc%, ByVal wSrc%, ByVal hSrc%, ByVal RasterOp&) ' StretchBlt moves a bitmap from a ' source rectangle to a destination ' rectangle, stretching or ' compressing the bitmap if ' necessary to fit the dimensions ' of the destination rectangle. ' Also see SetStretchBltMode. ' See the CONST section for ' values for RasterOp&. '-------------------------------------------------------------------------- ' These are the SUB and FUNCTION declarations for Windows KERNEL DLL Declare Function GetModuleFileName% Lib "Kernel" (ByVal hModule%, ByVal FileName$, ByVal nSize%) Declare Function GetPrivateProfileString% Lib "Kernel" (ByVal AppName$, ByVal KeyName$, ByVal Default$, ByVal ReturnedString$, ByVal nSize%, ByVal PFileName$) Declare Function LoadLibrary% Lib "Kernel" (ByVal LibName$) Declare Function WritePrivateProfileString% Lib "Kernel" (ByVal AppName$, ByVal KeyName$, ByVal PString$, ByVal PFileName$) '-------------------------------------------------------------------------- ' These are the SUB and FUNCTION declarations for Windows USER DLL Declare Sub CreateCaret Lib "User" (ByVal Hwnd%, ByVal hBiTmap%, ByVal nWidth%, ByVal nHeight%) Declare Sub DestroyCaret Lib "User" () Declare Function EnableHardwareInput% Lib "User" (ByVal TrueOrFalse%) Declare Function ExitWindows% Lib "User" (ByVal dwReserved&, ByVal wReturnCode%) Declare Function FlashWindow% Lib "User" (ByVal Hwnd%, ByVal bInvert%) Declare Function GetCaretBlinkTime% Lib "User" () Declare Function GetCurrentTime& Lib "User" () Declare Function GetDoubleClickTime% Lib "User" () Declare Function GetFocus% Lib "User" () Declare Function GetInputState% Lib "User" () Declare Function GetKeyState% Lib "User" (ByVal nVirtKey%) Declare Function GetMenu% Lib "User" (ByVal Hwnd%) Declare Function GetMenuItemID% Lib "User" (ByVal hMenu%, ByVal nPos%) Declare Function GetSubMenu% Lib "User" (ByVal hMenu%, ByVal nPos%) Declare Function GetWindowWord% Lib "User" (ByVal Hwnd%, ByVal Index%) Declare Sub HideCaret Lib "User" (ByVal Hwnd%) Declare Function IsCharAlpha% Lib "User" (ByVal cChar%) Declare Function IsCharAlphaNumeric% Lib "User" (ByVal cChar%) Declare Function IsCharLower% Lib "User" (ByVal cChar%) Declare Function IsCharUpper% Lib "User" (ByVal cChar%) Declare Function LoadCursor% Lib "User" (ByVal hInstance%, ByVal CursorName$) Declare Function ModifyMenu% Lib "User" (ByVal hMenu%, ByVal nPosition%, ByVal wFlags%, ByVal wIDNewItem%, ByVal lpNewItem&) Declare Sub SetCaretBlinkTime Lib "User" (ByVal Milliseconds%) Declare Function SetCursor% Lib "User" (ByVal hCursor%) Declare Sub SetDoubleClickTime Lib "User" (ByVal Milliseconds%) Declare Function SetMenuItemBitmaps% Lib "User" (ByVal hMenu%, ByVal nPosition%, ByVal wFlags%, ByVal hBitmapUnchecked%, ByVal hBitmapChecked%) Declare Sub ShowCaret Lib "User" (ByVal Hwnd%) Declare Function ShowWindow% Lib "User" (ByVal Hwnd%, ByVal nCmdShow%) Declare Function WinHelp% Lib "User" (ByVal Hwnd%, ByVal HelpFile$, ByVal HelpCommand%, ByVal HelpData As Any) '-------------------------------------------------------------------------- ' These are the CONSTANT declarations for the Windows DLL routines ' WinHelp values Global Const HELP_CONTEXT = 1 Global Const HELP_QUIT = 2 Global Const HELP_INDEX = 3 Global Const HELP_HELPONHELP = 4 Global Const HELP_SETINDEX = 5 Global Const HELP_KEY = &H101 Global Const HELP_MULTIKEY = &H201 ' Virtual key codes Global Const VK_CAPITAL = &H14 Global Const VK_CONTROL = &H11 Global Const VK_INSERT = &H2D Global Const VK_NUMLOCK = &H90 Global Const VK_OEM_SCROLL = &H91 Global Const VK_SHIFT = &H10 ' Menu flags and colors Global Const CLR_MENUBAR = &H80000004 Global Const MF_BITMAP = &H4 ' ShowWindow routine nCmdShow% Global Const SW_SHOWNORMAL = 1 Global Const SW_RESTORE = 9 ' Used with GetWindowsWord Global Const GWW_HINSTANCE = -6 ' BitBlt and StretchBlt values for RasterOp& Global Const BLACKNESS = &H42 ' CLS black Global Const DSTINVERT = &H550009 ' Inverts destination bitmap Global Const MERGECOPY = &HC000CA ' Combines pattern and source bitmap using AND Global Const MERGEPAINT = &HBB0226 ' Combines inverted source bitmap with destination bitmap using OR Global Const NOTSRCCOPY = &H330008 ' Copies inverted source bitmap to destination Global Const NOTSRCERASE = &H1100A6 ' Inverts result of combining destination and source bitmaps using OR Global Const PATCOPY = &HF00021 ' Copies the pattern to destination bitmap Global Const PATINVERT = &H5A0049 ' Copies destination bitmap with pattern using XOR Global Const PATPAINT = &HFB0A09 ' Combines inverted source bitmap with pattern using OR. ' Combines that result with destination bitmap using OR. Global Const SRCAND = &H8800C6 ' Combines pixels of dest and src bitmaps using AND Global Const SRCCOPY = &HCC0020 ' Copies source bitmap to destination bitmap Global Const SRCERASE = &H440328 ' Inverts destination bitmap and combines result with source using AND Global Const SRCINVERT = &H660046 ' Combines pixels of dest and src bitmaps using XOR Global Const SRCPAINT = &HEE0086 ' Combines pixels of dest and src bitmaps using OR Global Const WHITENESS = &HFF0062 ' CLS white 'Declare Function pxwininit Lib "pxengwin.dll" (Appname$, ByVal PXShared%) As Integer 'Declare Function pxExit Lib "pxengwin.dll" () As Integer 'Declare Function pxtblopen Lib "pxengwin.dll" (TblName$, Tblhandle%, ByVal indx%, ByVal SaveChng%) As Integer 'Declare Function pxtblclose Lib "pxengwin.dll" (ByVal Tblhandle%) As Integer 'Declare Function pxtblcreate Lib "pxengwin.dll" (TblName$, ByVal nfields%, fnames$, ftypes$) As Integer 'Declare Function pxrecbufopen Lib "pxengwin.dll" (ByVal Tblhandle%, Rechandle%) As Integer 'Declare Function pxfldhandle Lib "pxengwin.dll" (ByVal Tblhandle%, ByVal fldname$, Fldhandle%) As Integer 'Declare Function pxrecget Lib "pxengwin.dll" (ByVal Tblhandle%, ByVal Rechandle%) As Integer 'Declare Function pxrecnext Lib "pxengwin.dll" (ByVal Tblhandle%) As Integer 'Declare Function pxgetalpha Lib "pxengwin.dll" (ByVal Rechandle%, ByVal Fldhandle%, ByVal bufsize%, alphaval$) As Integer 'Declare Function PXTblNRecs Lib "pxengwin.dll" (ByVal Tblhandle%, NumRecs&) As Integer ' ' ' Paradox Engine DLL (v2.0) Declarations for Visual Basic (v1.0) ' ' ' Brian Barnt, CIS 73457,1510 ' Bryan Figler, CIS 70672,274 ' ' Date By Revisions ' --------- --- ----------------------------------------- ' 17-JUN-91 Original Entry ' 18-JUN-91 BJB Fixed bug in PXGetAlpha() ' 19-JUN-91 BJB Fixed other As Anys & cleanedup ' ' Paradox Typedef equivilents ' ' ' TABLEHANDLE is type Integer (%) ' RECORDHANDLE is type Integer (%) ' FIELDHANDLE is type Integer (%) ' LOCKHANDLE is type Integer (%) ' RECORDNUMBER is type Long (&) ' DATE is type Long (&) ' ' ' NOTE: Functions that are commented out have no equivient in Visual ' Basic. This is due to the fact that Visual Basic does not ' support variable length string arrays. ' ' The Routines not supported include: ' ' PXSetDefaults() )- use CFG program included with Engine ' PXGetDefaults() ) from Borland (per Documentation) ' ' PXTblCreate() - if anyone figures this out, let me know. ' PXErrMsg() - returns char * -- Also not supported ' See substitute VB function PXErrMsg() in ' PXERR.TXT ' ' Global Variable Declarations (Equivelent to #define) ' Global Const InternalVersion& = &H2000004 Global Const PXSUCCESS% = 0 ' 6/25/91 JMK Global Const PXERR_RECNOTFOUND% = 89 Global Const PXDEFAULT& = 0 Global Const MAXTABLEHANDLES% = 64 Global Const DEFTABLEHANDLES% = 5 Global Const MAXRECORDHANDLES% = 128 Global Const DEFRECORDHANDLES% = 10 Global Const MAXLOCKHANDLES% = 128 Global Const DEFLOCKHANDLES% = 32 Global Const MAXFILEHANDLES% = 255 Global Const MINFILEHANDLES% = 2 Global Const DEFFILEHANDLES% = 10 Global Const DEFSORTORDER% = -1 Global Const MAXSWAPSIZE% = 256 Global Const MINSWAPSIZE% = 8 Global Const DEFSWAPSIZE% = 32 Global Const NotOnNet% = 1 Global Const NovellNet% = 2 Global Const ThreeComNet% = 3 Global Const ThreeOpenNet% = 4 Global Const OtherNet% = 5 Global Const StarLanNet% = 7 Global Const BanyanNet% = 8 Global Const IbmPcNet% = 9 Global Const LocalShare% = 32 Global Const DefUserName$ = "" Global Const Primary% = 0 Global Const Secondary% = 1 Global Const IncSecondary% = 2 Global Const SearchFirst% = 0 Global Const SearchNext% = 1 Global Const ClosestRecord% = 2 ' ** JMK Added to support higher level interface Global Const LASTRec& = -10 Global Const FIRSTRec& = -9 Global Const NEXTRec& = -8 Global Const PREVRec& = -7 ' ' 6/22/91 Global Const FL% = 1 Global Const WL% = 2 Global Const PWL% = 3 Global Const PFL% = 4 'Global Const TRUE% = -1 'Global Const FALSE% = 0 Global Const BlankDate& = &H80000000 Global Const BlankLong& = &H80000000 Global Const BlankShort% = &H8000 ' ' Function Declarations ' Declare Function pxwininit% Lib "pxengwin.dll" (ByVal szAppName As String, ByVal iShareMode As Integer) Declare Function pxExit% Lib "pxengwin.dll" () ' 'Declare Function PXSetDefaults% Lib "pxengwin.dll" (ByVal bufSize As Integer, ByVal maxTables As Integer, ByVal maxRecBufs As Integer, ByVal maxLocks As Integer, ByVal maxFiles As Integer, _SORT_ORDER_) 'Declare Function PXGetDefaults% Lib "pxengwin.dll" (bufSize As Any, maxTables As Any, maxRecBufs As Any, maxLocks As Any, maxFiles As Any, _SORT_ORDER_) ' ' Sort order is a char (i.e. byte) variable, no VB equivilent exists. ' Declare Function ISBLANKDOUBLE% Lib "pxengwin.dll" (ByVal Doub As Double) Declare Function BLANKDOUBLE# Lib "pxengwin.dll" (Doub As Double) ' ' Table Functions Declare Function PxTblOpen% Lib "pxengwin.dll" (ByVal szTblName As String, ptblHandle As Integer, ByVal indexID As Integer, ByVal saveEveryChange As Integer) Declare Function pxTblClose% Lib "pxengwin.dll" (ByVal tblHandle As Integer) ' 'Declare Function PXTblCreate% Lib "pxengwin.dll" (ByVal szTblName As String, ByVal nFields As Integer,_**FIELDS_,_**TYPES_ ) ' ' FIELDS and TYPES are arrays of pointers to strings. These are not ' supported by Visual Basic. ' ' Declare Function PXTblEmpty% Lib "pxengwin.dll" (ByVal szTblName As String) Declare Function PXTblDelete% Lib "pxengwin.dll" (ByVal szTblSrcName As String) Declare Function PXTblCopy% Lib "pxengwin.dll" (ByVal szTblSrcName As String, ByVal szTblDestName As String) Declare Function PXTblRename% Lib "pxengwin.dll" (ByVal szTblOldName As String, ByVal szTblNewName As String) Declare Function PXTblAdd% Lib "pxengwin.dll" (ByVal szTblSrcName As String, ByVal szTblDestName As String) ' Record Functions Declare Function PxRecGet% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal recHandle As Integer) Declare Function PXRecAppend% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal recHandle As Integer) Declare Function PxRecInsert% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal recHandle As Integer) Declare Function PxRecUpdate% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal recHandle As Integer) Declare Function PxRecDelete% Lib "pxengwin.dll" (ByVal tblHandle As Integer) Declare Function PxRecBufOpen% Lib "pxengwin.dll" (ByVal tblHandle As Integer, recHandle As Integer) Declare Function PXRecBufClose% Lib "pxengwin.dll" (ByVal recHandle As Integer) ' error wrong parameters. Declare Function PxRecBufEmpty% Lib "pxengwin.dll" (ByVal fromHandle As Integer, ByVal toHandle As Integer) Declare Function PxRecBufEmpty% Lib "pxengwin.dll" (ByVal recHandle As Integer) Declare Function PXRecBufCopy% Lib "pxengwin.dll" (ByVal fromHandle As Integer, ByVal toHandle As Integer) ' Field Functions Declare Function PxPutShort% Lib "pxengwin.dll" (ByVal recHandle As Integer, ByVal fieldHandle As Integer, ByVal value As Integer) Declare Function PXPutLong% Lib "pxengwin.dll" (ByVal recHandle As Integer, ByVal fieldHandle As Integer, ByVal value As Long) Declare Function PxPutDoub% Lib "pxengwin.dll" (ByVal recHandle As Integer, ByVal fieldHandle As Integer, ByVal value As Double) Declare Function PxPutAlpha% Lib "pxengwin.dll" (ByVal recHandle As Integer, ByVal fieldHandle As Integer, ByVal value As String) Declare Function PxPutDate% Lib "pxengwin.dll" (ByVal recHandle As Integer, ByVal fieldHandle As Integer, ByVal value As Long) Declare Function PxPutBlank% Lib "pxengwin.dll" (ByVal recHandle As Integer, ByVal fieldHandle As Integer) Declare Function PxGetShort% Lib "pxengwin.dll" (ByVal recHandle As Integer, ByVal fieldHandle As Integer, value As Integer) Declare Function PXGetLong% Lib "pxengwin.dll" (ByVal recHandle As Integer, ByVal fieldHandle As Integer, value As Long) Declare Function PxGetDoub% Lib "pxengwin.dll" (ByVal recHandle As Integer, ByVal fieldHandle As Integer, value As Double) Declare Function PxGetAlpha% Lib "pxengwin.dll" (ByVal recHandle As Integer, ByVal fieldHandle As Integer, ByVal bufsize As Integer, ByVal value As String) Declare Function PxGetDate% Lib "pxengwin.dll" (ByVal recHandle As Integer, ByVal fieldHandle As Integer, value As Long) ' JMK added 7/17/91 Declare Function PxFldBlank% Lib "pxengwin.dll" (ByVal recHandle As Integer, ByVal fieldHandle As Integer, value As Integer) ' File Positioning Functions 'Declare Function PxRecGoto% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal recHandle As Integer) Declare Function PxRecGoto% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal recNbr As Long) Declare Function PxRecFirst% Lib "pxengwin.dll" (ByVal tblHandle As Integer) Declare Function PxRecLast% Lib "pxengwin.dll" (ByVal tblHandle As Integer) Declare Function PxRecNext% Lib "pxengwin.dll" (ByVal tblHandle As Integer) Declare Function PxRecPrev% Lib "pxengwin.dll" (ByVal tblHandle As Integer) ' Index Functions Declare Function PXKeyAdd% Lib "pxengwin.dll" (ByVal tblname As String, ByVal nFlds As Integer, fldHandleArray() As Integer, ByVal mode As Integer) Declare Function PXKeyDrop% Lib "pxengwin.dll" (ByVal tblname As String, ByVal indexID As Integer) ' Date Functions Declare Function PxDateDecode% Lib "pxengwin.dll" (ByVal ldate As Long, mn As Integer, dy As Integer, yr As Integer) Declare Function PxDateEncode% Lib "pxengwin.dll" (ByVal mn As Integer, ByVal dy As Integer, ByVal yr As Integer, ldate As Long) ' Search Functions Declare Function PXSrchKey% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal recHandle As Integer, ByVal nFlds As Integer, ByVal mode As Integer) Declare Function PxSrchFld% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal recHandle As Integer, ByVal fldHandle As Integer, ByVal mode As Integer) ' Password Functions Declare Function PXTblProtected% Lib "pxengwin.dll" (ByVal tblname As String, Protected As Integer) Declare Function PXPswAdd% Lib "pxengwin.dll" (ByVal password As String) Declare Function PXPswDel% Lib "pxengwin.dll" (ByVal password As String) Declare Function PXTblEncrypt% Lib "pxengwin.dll" (ByVal tblname As String, ByVal password As String) Declare Function PXTblDecrypt% Lib "pxengwin.dll" (ByVal tblname As String) ' Informational Functions Declare Function pxtblexist% Lib "pxengwin.dll" (ByVal tblname As String, Exist As Integer) Declare Function PXTblName% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal bufsize As Integer, ByVal tblname As String) Declare Function PXRecNum% Lib "pxengwin.dll" (ByVal tblHandle As Integer, nRecs As Long) Declare Function pxTblNRecs% Lib "pxengwin.dll" (ByVal tblHandle As Integer, nRecs As Long) 'error wrong type Declare Function pxRecNFlds% Lib "pxengwin.dll" (ByVal tblHandle As Integer, nFlds As Long) Declare Function pxRecNFlds% Lib "pxengwin.dll" (ByVal tblHandle As Integer, nFlds As Integer) 'error wrong function name Declare Function PXKeyFlds% Lib "pxengwin.dll" (ByVal tblHandle As Integer, nKeyFlds As Integer) Declare Function PxKeyNFlds% Lib "pxengwin.dll" (ByVal tblHandle As Integer, nKeyFlds As Integer) Declare Function PxFldHandle% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal fieldName As String, fldHandle As Integer) 'error wron parameters. Declare Function PxFldType% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal fldHandle As Integer, ByVal bufSize As Integer, fldType As Integer) Declare Function PxFldType% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal fldHandle As Integer, ByVal bufsize As Integer, ByVal fldType As String) Declare Function PxFldName% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal fldHandle As Integer, ByVal bufsize As Integer, ByVal fldName As String) ' Misc Functions Declare Function PXSave% Lib "pxengwin.dll" () ' Concurrency Functions Declare Function PXNetUserName% Lib "pxengwin.dll" (ByVal bufsize As Integer, ByVal userName As String) Declare Function PXNetFileLock% Lib "pxengwin.dll" (ByVal FileName As String, ByVal lockType As Integer) Declare Function PXNetFileUnlock% Lib "pxengwin.dll" (ByVal FileName As String, ByVal lockType As Integer) Declare Function PXNetTblLock% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal lockType As Integer) Declare Function PXNetTblUnlock% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal lockType As Integer) Declare Function PXNetRecLock% Lib "pxengwin.dll" (ByVal tblHandle As Integer, lckHandle As Integer) Declare Function PXNetRecUnock% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal lckHandle As Integer) Declare Function PXNetRecLocked% Lib "pxengwin.dll" (ByVal tblHandle As Integer, locked As Integer) Declare Function PXNetRecGotoLock% Lib "pxengwin.dll" (ByVal tblHandle As Integer, ByVal lckHandle As Integer) Declare Function PXNetTblChanged% Lib "pxengwin.dll" (ByVal tblHandle As Integer, changed As Integer) Declare Function PXNetTblRefresh% Lib "pxengwin.dll" (ByVal tblHandle As Integer) Declare Function PXNetErrUser% Lib "pxengwin.dll" (ByVal bufsize As Integer, ByVal userName As String) ' New global declarations Global tablename$(6) Global inuse%(6) ' New API declarations 'Declare Function GetFocus% Lib "user" () Declare Function SendMessage& Lib "user" (ByVal Hwnd%, ByVal wmsg%, ByVal wp%, lp As Any) Declare Function PutFocus% Lib "user" Alias "SetFocus" (ByVal Hwnd%) Global Const WM_USER = &H400 Global Const LB_SETTABSTOPS = WM_USER + 19 Global Const MODAL% = 1 Global Const MODELESS% = 0